package game.tictactoe.impl;

import game.tictactoe.pojo.Board;
import game.tictactoe.pojo.Player;
import game.tictactoe.pojo.Seed;

/**
 * Interface exposed to all UIs. It contains methods to set up the type of players and board, return status of the game.
 * Seed can be X, 0 or empty string. Board is made of array of seeds.
 * @author Suji
 *
 */
public interface GameInterface
{
	/**
	 * Set up players for the game. 
	 * @param player1
	 * @param player2
	 */
	public void setUpPlayers(Player player1, Player player2);
	
	/**
	 * Imposes boundary condition for the board, checks if the userMove is valid and returns result as a boolean
	 * @param userMove
	 * @param seed
	 * @return
	 */
	public boolean processMove(int userMove, Seed seed);
	
	/**
	 * Status of the game can be +1, -1, 0 or -2. The mapping is:
	 * +1 - AI won the game
	 * -1 - Human won the game
	 * 0 - Game is a tie
	 * -2 - Game is not over yet
	 * @return
	 */
	public int getGameStatus();
		
	/**
	 * Returns the reference to board
	 * @return
	 */
	public Board getBoard();
	
	
	/**
	 * Defines Board with its row and column index
	 * @param rowIndex
	 * @param colIndex
	 */
	public void setBoard(int rowIndex, int colIndex);

}
